import request from "@/utils/request";
// 列表  委外收车
export function getPickList(query) {
  return request({
    url: "/backCar/backCar/list",
    method: "get",
    params: query,
  });
}

// 授权即将到期
export function authorizationExpires(query) {
  return request({
    url: "/backCar/backCar/authorizationExpires",
    method: "get",
    params: query,
  });
}

// 申请委外收车-选择客户列表
export function selectCustomerList(query) {
  return request({
    url: "/backCar/backCar/selectCustomerList",
    method: "get",
    params: query,
  });
}

// 申请委外收车-选择车辆
export function selectCarList(query) {
  return request({
    url: "/backCar/backCar/selectCarList",
    method: "get",
    params: query,
  });
}


// 申请委外收车-提交
export function submitBackCar(data) {
  return request({
    url: "/backCar/backCar",
    method: "post",
    data
  });
}

// 委外收车撤销/终止
export function backCarCancel(data) {
  return request({
    url: "/backCar/backCar/backCarCancel",
    method: "post",
    data
  });
}

// 更换供应商
export function backCarSupplier(data) {
  return request({
    url: "/backCar/backCar/backCarSupplier",
    method: "post",
    data
  });
}

// 查询供应商列表
export function getSupplierList(query) {
  return request({
    url: "/supplier/supplier/list",
    method: "get",
    params: query,
  });
}

// 提交收车结果-选择车辆
export function getSelectCarListList(query) {
  return request({
    url: "/backCar/backCarResult/selectCarList",
    method: "get",
    params: query,
  });
}


// 提交收车结果
export function backCarResult(data) {
  return request({
    url: "/backCar/backCarResult",
    method: "post",
    data
  });
}

// 获取委外收车详细信息
export function backCarDetail(id) {
  return request({
    url: `/backCar/backCar/${id}`,
    method: "get"
  });
}

// 自行收车详情
export function backCarResultDetail(id) {
  return request({
    url: `/backCar/backCarResult/${id}`,
    method: "get"
  });
}

// 授权延期
export function postpone(data) {
  return request({
    url: `/backCar/backCar/postpone`,
    method: "post",
    data
  });
}


// 有无可付款费用
export function thereAreNoPayableCharges(id) {
  return request({
    url: `/backCar/backCarPayment/thereAreNoPayableCharges/${id}`,
    method: "get",
  });
}

// 申请付款详情
export function applyForPaymentInfo(id) {
  return request({
    url: `/backCar/backCarPayment/applyForPaymentInfo/${id}`,
    method: "get",
  });
}

// 申请付款提交
export function applyForPaymentSubmit(data) {
  return request({
    url: `/backCar/backCarPayment/applyForPayment`,
    method: "post",
    data
  });
}

// 申请付款提交
export function getSupplierInfoDetail(id) {
  return request({
    url: `/backCar/backCar/getSupplierInfo/${id}`,
    method: "get",
  });
}


//查询司机基础信息列表
export function queryDriverList(query) {
  return request({
    url: `/replacementCar/queryDriverList`,
    method: "get",
    params: query
  });
}

//查询车辆基础信息列表
export function queryCarList(query) {
  return request({
    url: `/replacementCar/queryCarList`,
    method: "get",
    params: query
  });
}
//查询子订单公用车牌列表
export function queryPublicLicensePlatesList(query) {
  return request({
    url: `/replacementCar/queryPublicLicensePlatesList`,
    method: "get",
    params: query
  });
}

//查询车辆信息和商业险信息
export function queryInsurancePackages(query) {
  return request({
    url: `/replacementCar/queryInsurancePackages`,
    method: "get",
    params: query
  });
}

// 重新发起委外收车详情
export function anewDetail(id) {
  return request({
    url: `/backCar/backCar/anewDetail/${id}`,
    method: "get"
  });
}


// 更换详情
export function getDataDetail(id) {
  return request({
    url: `/backCar/backCar/changeDataDetail/${id}`,
    method: "get"
  });
}
